import { myFetch } from './myFetch';


// 登录
// userId, userPass
export const postLogin = (params) => myFetch(`/login`, params, 'POST')

// 获取销售用户详情
export const getSaleDetail = salerId => myFetch(`/user/get_saler`, { salerId }, 'GET')

// 获取区域经理详情
export const getManagerDetail = managerId => myFetch(`/user/get_manager`, { managerId }, 'GET')

// 获取医生详情
export const getDoctorDetail = doctorId => myFetch(`/user/get_doctor`, { doctorId }, 'GET')

// 获取所有的销售
export const getSaleList = params => myFetch('/user/all_saler', params, 'GET')

// 获取所有的医生
export const getDoctorList = params => myFetch('/user/all_doctor', params, 'GET')




// 修改密码 
export const modifyPwd = params => myFetch('/change_pass', params, 'POST')

// 最新学术通知 最新会议
export const getLastMeetingList = params => myFetch('/meeting/latest', params)

// 所有会议 meeting/all 
export const getMeetingList = params => myFetch('/meeting/user/all', params)



// 获取所有会议
export const getMeetingListAll = params => myFetch('/meeting/all', params)

// 获取会议 /meeting/get
export const getMeetingDetail = params => myFetch('/meeting/get', params)

// 发布会议i
export const postPubMetting = params => myFetch('/meeting/pub', params, 'GET')

// 参加会议扫码 /meeting/attend?meetingType=0  废弃
// export const postAttendMeetting = params => myFetch('/meeting/attend', params, 'GET')

// 医生扫码参加会议
export const postAttendMeetting = params => myFetch('/attend_meeting', params,'POST')

// 非注册医生参加会议

export const postAttendMeetting1 = params => myFetch('/stranger/meeting/attend', params,'POST')


// 分享会议 wx/signature
export const shareMeeting = params => myFetch('/wx/signature', params, 'GET')


// 获取产品信息列表
export const getProductList = params => myFetch('/product/all', params, 'GET')

// 获取产品详情
export const getProductDetail = params => myFetch('/product/get', params, 'GET')

// 获取医学知识列表
export const getMedicalList = params => myFetch('/medical/all', params, 'GET')

// 获取医学详情
export const getMedicalDetail = params => myFetch('/medical/get', params, 'GET')

// 获取百问百答
export const getQuestionList = params => myFetch('/question_answer/all', params, 'GET')

// 获取白问百答详情 
export const getQuestionDetail = params => myFetch('/question_answer/get', params, 'GET')




// 获取凝宁观点 宁视点  
export const getFutureList = params => myFetch('/future/all', params)

// 获取最近的宁聚未来 future/latest
export const getFutureLast = params => myFetch('/future/latest', params)

// 获取宁聚未来的详情
export const getFutureDetail = params => myFetch('/future/get', params)

// 前沿进展列表
export const getAdvanceList = params => myFetch('/advance/all', params)

// 前沿进展详情
export const getAdvanceDetail = params => myFetch('/advance/get', params)


// 获取备忘录 /memorandum/all
export const getMemoList = params => myFetch('/memorandum/all', params)

// 区域经理获取销售备忘录列表、
export const getSaleMemoList = params => myFetch('/memorandum/children/all', params)

// // 区域经理获取销售备忘录详情
// export const getSaleMemoDetail = params => myFetch('/memorandum/children/all', params)

// 用户添加备忘录  String title, String content
export const postAddMemo = params => myFetch('/memorandum/add', params,'POST')

// 获取备忘录详情 /memorandum/get
export const getMemoDetail = params => myFetch('/memorandum/get', params)

// 更新备忘录详情 /memorandum/update
export const updateMemoDetail = params => myFetch('/memorandum/update', params,'POST')

// 删除备忘录详情 /memorandum/del
export const delMemoDetail = params => myFetch('/memorandum/del', params, 'POST')



// 获取问卷调查列表
export const getQuestionnaireList = params => myFetch('/question_invest/all', params, 'GET')

// 获取问卷调查详情
export const getQuestionnaireDetail = id => myFetch('/question_invest/get', { id }, 'GET')



// 获得销售的行为分析
export const getSaleAction = params => myFetch('/analysis/saler_action/all', params, 'GET')

// 获得某个医生参加某个类型会议的列表
export const getMettingListByType = params => myFetch('/analysis/doctor_action/meetings/all', params, 'GET')

// 获得医生的行为分析

export const getDoctorAction = params => myFetch('/analysis/doctor_action/all', params, 'GET')

// 随机获得一个每日医学
export const getTodayLearning = params => myFetch('/learning/get', params, 'GET')

// 每日一学记录 /learning/record
export const postStudyRecord = params => myFetch('/learning/record', params, 'GET')

// 获取已学习的产品和医学知识列表
export const getLearnedList = params => myFetch('/learning/learn_list', params, 'GET')

// 获取未学习的产品和医学知识列表
export const getUnlearnedList = params => myFetch('/learning/non_learn_list', params, 'GET')


// 搜索列表
export const getSearchList = params => myFetch('/search', params, 'GET')

// 获取用户某个月的签到情况
export const getSignAll = params => myFetch('/sign/all', params, 'GET');